
var express = require('express');
var router = express.Router();
var {joinModel} = require('../database/model/jobModel')

router.get('/join/list', function(req, res, next) { //查询报名列表
  // console.log(req.headers);
  // let {token} = req.headers   //提取前端通过headers携带的token
  // 合法性

  // 有效性
  let {userId} = req.query
  joinModel.find(req.query).then(result=>{
    res.send({
      code:1,
      msg:'报名列表加载成功',
      data:result
    })
  })
});

module.exports = router